Integrand size = 31, antiderivative size = 250 \[ \int \frac {\tan ^3(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^3} \, dx=-\frac {\left (3 a^2 A b-A b^3-a^3 B+3 a b^2 B\right ) x}{\left (a^2+b^2\right )^3}+\frac {\left (a^3 A-3 a A b^2+3 a^2 b B-b^3 B\right ) \log (\cos (c+d x))}{\left (a^2+b^2\right )^3 d}+\frac {a \left (a^2 A b^3-3 A b^5+a^5 B+3 a^3 b^2 B+6 a b^4 B\right ) \log (a+b \tan (c+d x))}{b^3 \left (a^2+b^2\right )^3 d}+\frac {a (A b-a B) \tan ^2(c+d x)}{2 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}-\frac {a^2 \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )}{b^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))} \]
[Out]
Time = 0.79 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3686, 3716, 3707, 3698, 31, 3556} \[ \int \frac {\tan ^3(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^3} \, dx=\frac {a (A b-a B) \tan ^2(c+d x)}{2 b d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {a^2 \left (2 A b^3-a B \left (a^2+3 b^2\right )\right )}{b^3 d \left (a^2+b^2\right )^2 (a+b \tan (c+d x))}+\frac {\left (a^3 A+3 a^2 b B-3 a A b^2-b^3 B\right ) \log (\cos (c+d x))}{d \left (a^2+b^2\right )^3}-\frac {x \left (a^3 (-B)+3 a^2 A b+3 a b^2 B-A b^3\right )}{\left (a^2+b^2\right )^3}+\frac {a \left (a^5 B+3 a^3 b^2 B+a^2 A b^3+6 a b^4 B-3 A b^5\right ) \log (a+b \tan (c+d x))}{b^3 d \left (a^2+b^2\right )^3} \]
[In]
[Out]
Rule 31
Rule 3556
Rule 3686
Rule 3698
Rule 3707
Rule 3716
Rubi steps \begin{align*} \text {integral}& = \frac {a (A b-a B) \tan ^2(c+d x)}{2 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}+\frac {\int \frac {\tan (c+d x) \left (-2 a (A b-a B)+2 b (A b-a B) \tan (c+d x)+2 \left (a^2+b^2\right ) B \tan ^2(c+d x)\right )}{(a+b \tan (c+d x))^2} \, dx}{2 b \left (a^2+b^2\right )} \\ & = \frac {a (A b-a B) \tan ^2(c+d x)}{2 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}-\frac {a^2 \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )}{b^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))}+\frac {\int \frac {-2 a \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )-2 b^2 \left (a^2 A-A b^2+2 a b B\right ) \tan (c+d x)+2 \left (a^2+b^2\right )^2 B \tan ^2(c+d x)}{a+b \tan (c+d x)} \, dx}{2 b^2 \left (a^2+b^2\right )^2} \\ & = -\frac {\left (3 a^2 A b-A b^3-a^3 B+3 a b^2 B\right ) x}{\left (a^2+b^2\right )^3}+\frac {a (A b-a B) \tan ^2(c+d x)}{2 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}-\frac {a^2 \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )}{b^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))}-\frac {\left (a^3 A-3 a A b^2+3 a^2 b B-b^3 B\right ) \int \tan (c+d x) \, dx}{\left (a^2+b^2\right )^3}+\frac {\left (a \left (a^2 A b^3-3 A b^5+a^5 B+3 a^3 b^2 B+6 a b^4 B\right )\right ) \int \frac {1+\tan ^2(c+d x)}{a+b \tan (c+d x)} \, dx}{b^2 \left (a^2+b^2\right )^3} \\ & = -\frac {\left (3 a^2 A b-A b^3-a^3 B+3 a b^2 B\right ) x}{\left (a^2+b^2\right )^3}+\frac {\left (a^3 A-3 a A b^2+3 a^2 b B-b^3 B\right ) \log (\cos (c+d x))}{\left (a^2+b^2\right )^3 d}+\frac {a (A b-a B) \tan ^2(c+d x)}{2 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}-\frac {a^2 \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )}{b^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))}+\frac {\left (a \left (a^2 A b^3-3 A b^5+a^5 B+3 a^3 b^2 B+6 a b^4 B\right )\right ) \text {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \tan (c+d x)\right )}{b^3 \left (a^2+b^2\right )^3 d} \\ & = -\frac {\left (3 a^2 A b-A b^3-a^3 B+3 a b^2 B\right ) x}{\left (a^2+b^2\right )^3}+\frac {\left (a^3 A-3 a A b^2+3 a^2 b B-b^3 B\right ) \log (\cos (c+d x))}{\left (a^2+b^2\right )^3 d}+\frac {a \left (a^2 A b^3-3 A b^5+a^5 B+3 a^3 b^2 B+6 a b^4 B\right ) \log (a+b \tan (c+d x))}{b^3 \left (a^2+b^2\right )^3 d}+\frac {a (A b-a B) \tan ^2(c+d x)}{2 b \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}-\frac {a^2 \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )}{b^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))} \\ \end{align*}
Result contains complex when optimal does not.
Time = 6.37 (sec) , antiderivative size = 235, normalized size of antiderivative = 0.94 \[ \int \frac {\tan ^3(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^3} \, dx=-\frac {(A+i B) \log (i-\tan (c+d x))}{2 (a+i b)^3 d}-\frac {(A-i B) \log (i+\tan (c+d x))}{2 (a-i b)^3 d}+\frac {a \left (a^2 A b^3-3 A b^5+a^5 B+3 a^3 b^2 B+6 a b^4 B\right ) \log (a+b \tan (c+d x))}{b^3 \left (a^2+b^2\right )^3 d}+\frac {a^3 (A b-a B)}{2 b^3 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^2}-\frac {a^2 \left (a^2 A b+3 A b^3-2 a^3 B-4 a b^2 B\right )}{b^3 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))} \]
[In]
[Out]
Time = 0.17 (sec) , antiderivative size = 242, normalized size of antiderivative = 0.97
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (-A \,a^{3}+3 A a \,b^{2}-3 B \,a^{2} b +B \,b^{3}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (-3 A \,a^{2} b +A \,b^{3}+B \,a^{3}-3 B a \,b^{2}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{3}}+\frac {a \left (A \,a^{2} b^{3}-3 A \,b^{5}+B \,a^{5}+3 B \,a^{3} b^{2}+6 B a \,b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{3} b^{3}}-\frac {a^{2} \left (A \,a^{2} b +3 A \,b^{3}-2 B \,a^{3}-4 B a \,b^{2}\right )}{b^{3} \left (a^{2}+b^{2}\right )^{2} \left (a +b \tan \left (d x +c \right )\right )}+\frac {a^{3} \left (A b -B a \right )}{2 b^{3} \left (a^{2}+b^{2}\right ) \left (a +b \tan \left (d x +c \right )\right )^{2}}}{d}\) | \(242\) |
default | \(\frac {\frac {\frac {\left (-A \,a^{3}+3 A a \,b^{2}-3 B \,a^{2} b +B \,b^{3}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (-3 A \,a^{2} b +A \,b^{3}+B \,a^{3}-3 B a \,b^{2}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{3}}+\frac {a \left (A \,a^{2} b^{3}-3 A \,b^{5}+B \,a^{5}+3 B \,a^{3} b^{2}+6 B a \,b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{3} b^{3}}-\frac {a^{2} \left (A \,a^{2} b +3 A \,b^{3}-2 B \,a^{3}-4 B a \,b^{2}\right )}{b^{3} \left (a^{2}+b^{2}\right )^{2} \left (a +b \tan \left (d x +c \right )\right )}+\frac {a^{3} \left (A b -B a \right )}{2 b^{3} \left (a^{2}+b^{2}\right ) \left (a +b \tan \left (d x +c \right )\right )^{2}}}{d}\) | \(242\) |
norman | \(\frac {-\frac {a^{2} \left (A \,a^{3} b +5 A a \,b^{3}-3 B \,a^{4}-7 B \,a^{2} b^{2}\right )}{2 d \,b^{3} \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}-\frac {\left (3 A \,a^{2} b -A \,b^{3}-B \,a^{3}+3 B a \,b^{2}\right ) a^{2} x}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \left (a^{2}+b^{2}\right )}-\frac {b^{2} \left (3 A \,a^{2} b -A \,b^{3}-B \,a^{3}+3 B a \,b^{2}\right ) x \left (\tan ^{2}\left (d x +c \right )\right )}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \left (a^{2}+b^{2}\right )}-\frac {a \left (A \,a^{3} b +3 A a \,b^{3}-2 B \,a^{4}-4 B \,a^{2} b^{2}\right ) \tan \left (d x +c \right )}{d \,b^{2} \left (a^{4}+2 a^{2} b^{2}+b^{4}\right )}-\frac {2 b \left (3 A \,a^{2} b -A \,b^{3}-B \,a^{3}+3 B a \,b^{2}\right ) a x \tan \left (d x +c \right )}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \left (a^{2}+b^{2}\right )}}{\left (a +b \tan \left (d x +c \right )\right )^{2}}+\frac {a \left (A \,a^{2} b^{3}-3 A \,b^{5}+B \,a^{5}+3 B \,a^{3} b^{2}+6 B a \,b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{\left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right ) d \,b^{3}}-\frac {\left (A \,a^{3}-3 A a \,b^{2}+3 B \,a^{2} b -B \,b^{3}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}\) | \(471\) |
parallelrisch | \(\text {Expression too large to display}\) | \(1014\) |
risch | \(-\frac {x B}{3 i a^{2} b -i b^{3}-a^{3}+3 a \,b^{2}}-\frac {2 i a^{6} B x}{b^{3} \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {12 i a^{2} b B c}{d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {2 i B c}{b^{3} d}-\frac {2 i a^{3} A x}{a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}+\frac {6 i a \,b^{2} A c}{d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {2 i a^{3} A c}{d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {2 i a^{6} B c}{b^{3} d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {2 i B x}{b^{3}}-\frac {i x A}{3 i a^{2} b -i b^{3}-a^{3}+3 a \,b^{2}}-\frac {2 i \left (3 B \,a^{4} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+i A \,a^{4} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+4 i B \,a^{3} b^{3}-4 i B \,a^{3} b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-3 i A \,a^{2} b^{4}-3 A \,a^{3} b^{3}+4 B \,a^{4} b^{2}+B \,a^{6} {\mathrm e}^{2 i \left (d x +c \right )}+i B \,a^{5} b +3 i A \,a^{2} b^{4} {\mathrm e}^{2 i \left (d x +c \right )}-2 i B \,a^{5} b \,{\mathrm e}^{2 i \left (d x +c \right )}+B \,a^{6}-2 A \,a^{3} b^{3} {\mathrm e}^{2 i \left (d x +c \right )}\right )}{\left (-i b \,{\mathrm e}^{2 i \left (d x +c \right )}+a \,{\mathrm e}^{2 i \left (d x +c \right )}+i b +a \right )^{2} b^{2} \left (i b +a \right )^{2} d \left (-i b +a \right )^{3}}+\frac {6 i a \,b^{2} A x}{a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}-\frac {6 i a^{4} B c}{b d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {12 i a^{2} b B x}{a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}-\frac {6 i a^{4} B x}{b \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) A}{d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {3 a \,b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) A}{d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {a^{6} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) B}{b^{3} d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {3 a^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) B}{b d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {6 a^{2} b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) B}{d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {B \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b^{3} d}\) | \(1020\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 666 vs. \(2 (245) = 490\).
Time = 0.34 (sec) , antiderivative size = 666, normalized size of antiderivative = 2.66 \[ \int \frac {\tan ^3(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^3} \, dx=\frac {B a^{6} b^{2} + A a^{5} b^{3} + 7 \, B a^{4} b^{4} - 5 \, A a^{3} b^{5} + 2 \, {\left (B a^{5} b^{3} - 3 \, A a^{4} b^{4} - 3 \, B a^{3} b^{5} + A a^{2} b^{6}\right )} d x - {\left (3 \, B a^{6} b^{2} - A a^{5} b^{3} + 9 \, B a^{4} b^{4} - 7 \, A a^{3} b^{5} - 2 \, {\left (B a^{3} b^{5} - 3 \, A a^{2} b^{6} - 3 \, B a b^{7} + A b^{8}\right )} d x\right )} \tan \left (d x + c\right )^{2} + {\left (B a^{8} + 3 \, B a^{6} b^{2} + A a^{5} b^{3} + 6 \, B a^{4} b^{4} - 3 \, A a^{3} b^{5} + {\left (B a^{6} b^{2} + 3 \, B a^{4} b^{4} + A a^{3} b^{5} + 6 \, B a^{2} b^{6} - 3 \, A a b^{7}\right )} \tan \left (d x + c\right )^{2} + 2 \, {\left (B a^{7} b + 3 \, B a^{5} b^{3} + A a^{4} b^{4} + 6 \, B a^{3} b^{5} - 3 \, A a^{2} b^{6}\right )} \tan \left (d x + c\right )\right )} \log \left (\frac {b^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) - {\left (B a^{8} + 3 \, B a^{6} b^{2} + 3 \, B a^{4} b^{4} + B a^{2} b^{6} + {\left (B a^{6} b^{2} + 3 \, B a^{4} b^{4} + 3 \, B a^{2} b^{6} + B b^{8}\right )} \tan \left (d x + c\right )^{2} + 2 \, {\left (B a^{7} b + 3 \, B a^{5} b^{3} + 3 \, B a^{3} b^{5} + B a b^{7}\right )} \tan \left (d x + c\right )\right )} \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right ) - 2 \, {\left (B a^{7} b + 3 \, B a^{5} b^{3} - 3 \, A a^{4} b^{4} - 4 \, B a^{3} b^{5} + 3 \, A a^{2} b^{6} - 2 \, {\left (B a^{4} b^{4} - 3 \, A a^{3} b^{5} - 3 \, B a^{2} b^{6} + A a b^{7}\right )} d x\right )} \tan \left (d x + c\right )}{2 \, {\left ({\left (a^{6} b^{5} + 3 \, a^{4} b^{7} + 3 \, a^{2} b^{9} + b^{11}\right )} d \tan \left (d x + c\right )^{2} + 2 \, {\left (a^{7} b^{4} + 3 \, a^{5} b^{6} + 3 \, a^{3} b^{8} + a b^{10}\right )} d \tan \left (d x + c\right ) + {\left (a^{8} b^{3} + 3 \, a^{6} b^{5} + 3 \, a^{4} b^{7} + a^{2} b^{9}\right )} d\right )}} \]
[In]
[Out]
Exception generated. \[ \int \frac {\tan ^3(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^3} \, dx=\text {Exception raised: AttributeError} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 366, normalized size of antiderivative = 1.46 \[ \int \frac {\tan ^3(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^3} \, dx=\frac {\frac {2 \, {\left (B a^{3} - 3 \, A a^{2} b - 3 \, B a b^{2} + A b^{3}\right )} {\left (d x + c\right )}}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} + \frac {2 \, {\left (B a^{6} + 3 \, B a^{4} b^{2} + A a^{3} b^{3} + 6 \, B a^{2} b^{4} - 3 \, A a b^{5}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{6} b^{3} + 3 \, a^{4} b^{5} + 3 \, a^{2} b^{7} + b^{9}} - \frac {{\left (A a^{3} + 3 \, B a^{2} b - 3 \, A a b^{2} - B b^{3}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} + \frac {3 \, B a^{6} - A a^{5} b + 7 \, B a^{4} b^{2} - 5 \, A a^{3} b^{3} + 2 \, {\left (2 \, B a^{5} b - A a^{4} b^{2} + 4 \, B a^{3} b^{3} - 3 \, A a^{2} b^{4}\right )} \tan \left (d x + c\right )}{a^{6} b^{3} + 2 \, a^{4} b^{5} + a^{2} b^{7} + {\left (a^{4} b^{5} + 2 \, a^{2} b^{7} + b^{9}\right )} \tan \left (d x + c\right )^{2} + 2 \, {\left (a^{5} b^{4} + 2 \, a^{3} b^{6} + a b^{8}\right )} \tan \left (d x + c\right )}}{2 \, d} \]
[In]
[Out]
none
Time = 0.85 (sec) , antiderivative size = 458, normalized size of antiderivative = 1.83 \[ \int \frac {\tan ^3(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^3} \, dx=\frac {\frac {2 \, {\left (B a^{3} - 3 \, A a^{2} b - 3 \, B a b^{2} + A b^{3}\right )} {\left (d x + c\right )}}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} - \frac {{\left (A a^{3} + 3 \, B a^{2} b - 3 \, A a b^{2} - B b^{3}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} + \frac {2 \, {\left (B a^{6} + 3 \, B a^{4} b^{2} + A a^{3} b^{3} + 6 \, B a^{2} b^{4} - 3 \, A a b^{5}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{6} b^{3} + 3 \, a^{4} b^{5} + 3 \, a^{2} b^{7} + b^{9}} - \frac {3 \, B a^{6} b \tan \left (d x + c\right )^{2} + 9 \, B a^{4} b^{3} \tan \left (d x + c\right )^{2} + 3 \, A a^{3} b^{4} \tan \left (d x + c\right )^{2} + 18 \, B a^{2} b^{5} \tan \left (d x + c\right )^{2} - 9 \, A a b^{6} \tan \left (d x + c\right )^{2} + 2 \, B a^{7} \tan \left (d x + c\right ) + 2 \, A a^{6} b \tan \left (d x + c\right ) + 6 \, B a^{5} b^{2} \tan \left (d x + c\right ) + 14 \, A a^{4} b^{3} \tan \left (d x + c\right ) + 28 \, B a^{3} b^{4} \tan \left (d x + c\right ) - 12 \, A a^{2} b^{5} \tan \left (d x + c\right ) + A a^{7} - B a^{6} b + 9 \, A a^{5} b^{2} + 11 \, B a^{4} b^{3} - 4 \, A a^{3} b^{4}}{{\left (a^{6} b^{2} + 3 \, a^{4} b^{4} + 3 \, a^{2} b^{6} + b^{8}\right )} {\left (b \tan \left (d x + c\right ) + a\right )}^{2}}}{2 \, d} \]
[In]
[Out]
Time = 8.27 (sec) , antiderivative size = 307, normalized size of antiderivative = 1.23 \[ \int \frac {\tan ^3(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^3} \, dx=\frac {\frac {3\,B\,a^6-A\,a^5\,b+7\,B\,a^4\,b^2-5\,A\,a^3\,b^3}{2\,b^3\,\left (a^4+2\,a^2\,b^2+b^4\right )}-\frac {a^2\,\mathrm {tan}\left (c+d\,x\right )\,\left (-2\,B\,a^3+A\,a^2\,b-4\,B\,a\,b^2+3\,A\,b^3\right )}{b^2\,\left (a^4+2\,a^2\,b^2+b^4\right )}}{d\,\left (a^2+2\,a\,b\,\mathrm {tan}\left (c+d\,x\right )+b^2\,{\mathrm {tan}\left (c+d\,x\right )}^2\right )}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,\left (-B+A\,1{}\mathrm {i}\right )}{2\,d\,\left (-a^3\,1{}\mathrm {i}+3\,a^2\,b+a\,b^2\,3{}\mathrm {i}-b^3\right )}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (A-B\,1{}\mathrm {i}\right )}{2\,d\,\left (-a^3+a^2\,b\,3{}\mathrm {i}+3\,a\,b^2-b^3\,1{}\mathrm {i}\right )}+\frac {a\,\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )\,\left (B\,a^5+3\,B\,a^3\,b^2+A\,a^2\,b^3+6\,B\,a\,b^4-3\,A\,b^5\right )}{b^3\,d\,{\left (a^2+b^2\right )}^3} \]
[In]
[Out]